﻿/**
 * 
 * @file   FITKAcousticsHDF5DataSet.h
 * @brief  HDF5数据集
 * @author TanDongYang (tandongyang@diso.cn)
 * @date   2024-11-21
 * 
 */
#ifndef FITKACOUSTICSHDF5DATASET_H
#define FITKACOUSTICSHDF5DATASET_H

#include "FITKAcousticsPostDataAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"

namespace Acoustics
{
    /**
     * @brief   HDF5数据集
     * @author  TanDongYang (tandongyang@diso.cn)
     * @date    2024-11-21 
     */
    class FITKAcousticsPostDataAPI FITKAcousticsHDF5DataSet : public Core::FITKAbstractNDataObject
    {
    public:
        /**
         * @brief   Construct a new FITKAcousticsHDF5DataSet object
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21 
         */
        explicit FITKAcousticsHDF5DataSet() = default;

        /**
         * @brief   Destroy the FITKAcousticsHDF5DataSet object
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21 
         */
        virtual ~FITKAcousticsHDF5DataSet() = default;
    
        /**
         * @brief   获取维度
         * @return  维度值
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21 
         */
        int getDimen() const { return _dimen; }

        /**
         * @brief
         * @param[i]   val
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21 
         */
        void setDimen(int val) { _dimen = val; }

        /**
         * @brief   获取数据集对象
         * @return  数据集
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21 
         */
        QHash<int, std::vector<float>> getValues() const { return _values; }

        /**
         * @brief   设置数据集对象
         * @param[i]   val  数据集
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21 
         */
        void setValues(QHash<int, std::vector<float>> val) { _values = val; }

    protected:

        /**
         * @brief   维度
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21 
         */
        int _dimen{ 1 };

        /**
         * @brief   数据集对象
         * @author  TanDongYang (tandongyang@diso.cn)
         * @date    2024-11-21 
         */
        QHash<int, std::vector<float>> _values;

    };

    /**
     * @brief   HDF5数据集管理类
     * @author  TanDongYang (tandongyang@diso.cn)
     * @date    2024-11-21 
     */
    class FITKAcousticsPostDataAPI FITKAcousticsHDF5DataSetManager : public Core::FITKAbstractDataObject
        , public Core::FITKAbstractDataManager<FITKAcousticsHDF5DataSet>
    {
        FITKCLASS(Acoustics, FITKAcousticsHDF5DataSetManager);
    public:
        explicit FITKAcousticsHDF5DataSetManager() = default;
        virtual ~FITKAcousticsHDF5DataSetManager() = default;
    };

}

#endif // FITKACOUSTICSHDF5DATASET_H
